﻿<Window x:Class="SQLiteDatabaseUtility.View.MainView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:diag="clr-namespace:System.Diagnostics;assembly=WindowsBase"
        xmlns:vm="clr-namespace:SQLiteDatabaseUtility.ViewModel"
        Title="Database Viewer" Height="494" Width="748"
        Loaded="Window_Loaded"
        WindowStartupLocation="CenterScreen">
    <StackPanel Orientation="Vertical">
        <TextBlock Name="TitleTxtBlock" HorizontalAlignment="Center" FontSize="20"/>
        <StackPanel Orientation="Vertical" Margin="15,5,15,5" >
            <ScrollViewer Name="Scroller" Height="380" >
                <ItemsControl ItemsSource="{Binding Output, diag:PresentationTraceSources.TraceLevel=High}">
                    <!--<TextBlock Name="ResultsDisplayTxtBox" />-->
                </ItemsControl>
            </ScrollViewer>
        </StackPanel>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
            <TextBlock Text="Command: " VerticalAlignment="Center"/>
            <TextBox 
                Width="400" 
                Name="ExecuteTxtBox"
                Margin="10,0,10,0" 
                Text="{Binding Command, 
                    diag:PresentationTraceSources.TraceLevel=High, 
                UpdateSourceTrigger=PropertyChanged}"
                />
            
            <Button 
                Content="_Execute" 
                Width="50" 
                VerticalAlignment="Center" 
                HorizontalAlignment="Center"
                Command="{Binding ExecuteCommandCommand}"
                IsDefault="True"/>
        </StackPanel>
    </StackPanel>
</Window>
